package com.zhuozhou.jdyc.main.main.adapter;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.zhuozhou.jdyc.R;
import com.zhuozhou.jdyc.base.BaseRecyclerViewAdapter;
import com.zhuozhou.jdyc.base.BaseViewHolder;
import com.zhuozhou.jdyc.databinding.ShopClassifyItemBinding;
import com.zhuozhou.jdyc.main.main.bean.BasicsTypeDetailsBean;

/**
 * Create by Once_ChuXy on 2021/8/19
 * Describe:
 */
public class ShopClassifyAdapter extends BaseRecyclerViewAdapter<BasicsTypeDetailsBean.ArrayBean, ShopClassifyItemBinding> {

    public ShopClassifyAdapter(Context context) {
        super(context);
    }

    @Override
    public void onBindHolder(BaseViewHolder<ShopClassifyItemBinding> holder, int pos) {
        Glide.with(mContext).load(mList.get(pos).getImage()).into(holder.getBinding().imageMerchant);
        holder.getBinding().tvName.setText(mList.get(pos).getName());
    }

    @Override
    protected int getLayoutId() {
        return R.layout.shop_classify_item;
    }
}
